# -*- coding: utf8 -*-


#IQ CONNECTION SETTING.
IQ_CONNECT = {
    'userid': 'DBA',
    'password': '******',
    'host': '127.0.0.1:5000',
}

#DATA FILE SETTINGS.
FILE_SUFFIX = '.txt'
FIELDS_SEPARATOR = '|'
END_SYMBOL = '0x0a'

#DIRECTORY PATH SETTINGS.
#SOURCE FILE
SRCDATA_DIR ='/home/***/data1/'
FILE_PATTERN='201[5-9][01][12][0123]\d[012]\d[0-5]\d'
DATE_PATTERN='201[5-9][01][12][0123]\d[012]\d[0-5]\d'

#LOAD DIRECTORY SETTINGS.
LOAD_DIR = '/home/***/load_dir/'

#BAK SETTINGS.
BAK = True
BAK_DIR = '/home/***/data1/bak_data/'

#DELETE SOURCE FILE SETTINGS.
DEL_FILE_AFTER_LOAD = True

#target table information:
TARGET_TABLE_NAME = 'kyfx_src_data'

#IF TABLE NOT EXISES, CREATE TABLE STRUCTURE.
TARGET_TABLE_STRUCTURE = """
        start_time   char(32),
        mdn          char(40),
        scenicid     int     ,
        mdn_prov_id  int     ,
        mdn_city_id  int     ,
        s_cycle_date char(32)
"""

#COLUMNS TO LOAD IN SQL.
COLUMNS = ('start_time','mdn','scenicid','mdn_prov_id','mdn_city_id','s_cycle_date')
